#ifndef CpSimulator_h
#define CpSimulator_h

#include <TNamed.h>
#include <TString.h>
#include <TTree.h>

#include "CpEvent.h"

class CpSimulator : public TNamed {
public:
   CpSimulator(const char*name = "cpSim", const char *title = "Default Cp simulator");
   ~CpSimulator();

   Int_t       Init();
   Int_t       Finalize();

   Int_t       Simulate();
   void        ShowEvent(const Long64_t &eventNum);

   Long64_t    GetNumberOfEvents() { return fNumberOfEvents;}
   void        SetNumberOfEvents(const Long64_t &num) { fNumberOfEvents = num;}

   Long64_t    GetNumberOfTracksInOneEvent() { return fNumberOfTracksInOneEvent;}
   void        SetNumberOfTracksInOneEvent(const Long64_t &num) { fNumberOfTracksInOneEvent = num;}

   void        SetOutputFileName(const TString &name) { fOutputFileName = name;}
   TString     GetOutputFileName() { return fOutputFileName;}

   void        SetGeometryFile(const TString &name) { fGeometryFile = name;}
   TString     GetGeometryFile() { return fGeometryFile;}

private:

   Long64_t    fNumberOfEvents;
   Long64_t    fNumberOfTracksInOneEvent;

   TFile      *fCurrentFile;
   TString     fOutputFileName;

   TString     fGeometryFile;

   TTree       fTree;
   CpEvent    *fEvent;


   ClassDef(CpSimulator, 1);

};

#endif
